package com.deltapunkt.proxy;

import java.nio.channels.SocketChannel;

public class Command {
	public static final int OP_NONE = 0;

	public static enum Type {
		REGISTER,
		SETOPS,
		TERMINATE
	}
	
	private final Type type;
	private final SocketChannel s;
	private final int ops;
	
	public Command(Type type, SocketChannel s, int ops){
		this.type = type;
		this.s = s;
		this.ops = ops;
	}

	public Command(Type type, SocketChannel s){
		this.type = type;
		this.s = s;
		this.ops = OP_NONE;
	}

	public SocketChannel getChannel(){
		return s;
	}
	
	public int getOps(){
		return ops;
	}
	
	public Type getType() {
		return type;
	}
}
